import diff from "./diff";

export default function updateComponent(vDom, oldComponent, oldDom, container) {
  // 组件更新
  oldComponent.updateProps(vDom.props);
  const nextVDom = oldComponent.render();
  nextVDom.component = oldComponent;
  diff(nextVDom, container, oldDom);
}
